﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using CafeOnline.MvcFramework.Grid;
using CafeOnline.MvcFramework.Web;

namespace CafeOnline.MvcFramework.Utils {
    public static class GridHelper {
        public static IHtmlString GetGrid(this HtmlHelper helper,string gridType, string gridId,GridOptions options) {
            var gridProvider = MefMvcApplication.CurrentContainer.GetExportedValue<GridProvider>();
            return gridProvider.GetGridFactory(gridType).Instantiate(gridId, options);
        }
    }
}
